<template>
  <div class="shop_item">
    <img class="shop_item_img" :src="item.image" alt="" />
    <div class="shop_item_info">
      <div class="shop_item_info_title">
        {{ item.thingname }}
      </div>
      <div
        class="shop_item_info_price"
        style="color: #e34a4a; margin-bottom: 5px"
      >
        ¥{{ item.thingprice.trim() }}
      </div>
    </div>
  </div>
</template>

<script>
import Button from '@/components/Button'
export default {
  components: {
    Button
  },
  props: {
    item: {
      type: Object,
      default: () => { }
    }
  },
  data() {
    return {

    }
  },
}
</script>

<style lang="scss" scoped>
.shop_item {
  width: 200px;
  height: 200px;
  background: rgba($color: #974a4a, $alpha: 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  .shop_item_img {
    width: 100%;
    height: 150px;
    object-fit: cover;
  }
  .shop_item_info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  // 超出一行省略号
  .shop_item_info_title {
    width: 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    margin: 5px 0;
  }
}
</style>